import * as actionTypes from './actionTypes';

const initState = {
  searchVal:'',
  searchList:[]
};

export default (state = initState,action) => {
  switch (action.type) {
    case actionTypes.SET_SEARCHVAL:
      return Object.assign({},state,{searchVal:action.searchVal})
    
    case actionTypes.SET_SEARCHLIST:
      return Object.assign({},state,{searchList:action.searchList})

    default:
      return state;
  }
} 
